#ifndef VXLABELSCONTAINER_H
#define VXLABELSCONTAINER_H

#include <QWidget>
#include "vxlabel.h"


class VxLabelsContainer : public QFrame
{
	Q_OBJECT
public:
	VxLabelsContainer(QWidget * parent=0);

	VxLabel * addLabel(VxLabelData * data, QWidget * container);


protected:
	bool eventFilter(QObject *, QEvent *);

private:
	QSet<VxLabel *> _labels;
	QMenu _menu;
	QPushButton * _addButton;
	QHBoxLayout * _layout;
	void _adjustLabels();
	void _execMenu(QWidget * widget, bool changeAction);
	bool _haveMenuItems();

private slots:
	void _addLabelsMenu();
	void _checkAddButton();


};

#endif // VXLABELSCONTAINER_H
